[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
$SIG{expr}
The associative array SIG is used to set signal
handlers for various signals. Example:
sub handler { # 1st argument is signal name
local($sig) = @_;
print "Caught a SIG$sig--shutting down\n";
close(LOG);
exit(0);
}
$SIG{'INT'} = 'handler';
$SIG{'QUIT'} = 'handler';
...
$SIG{'INT'} = 'DEFAULT'; # restore default action
$SIG{'QUIT'} = 'IGNORE'; # ignore SIGQUIT
The SIG array only contains values for the signals
actually set within the perl script.
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson